﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace SYH.Public.BLL
{
    public class Public_Messages
    {
        public static readonly SYH.Public.DAL.Public_Messages dal = new DAL.Public_Messages();

        #region 得到站内信表的对象实体
        /// <summary>
        /// 得到站内信表的对象实体
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Model.Public_Messages GetModel(string id)
        {
            return dal.GetModel(id);
        }
        #endregion

        #region 站内信详细页使用，查找当前收到消息及回复消息
        /// <summary>
        /// 站内信详细页使用，查找当前收到消息及回复消息
        /// </summary>
        /// <param name="infoId"></param>
        /// <returns></returns>
        public DataSet GetAllMsgCurrent(int infoId)
        {
            return dal.GetAllMsgCurrent(infoId);
        }
        #endregion

        #region 获取系统消息标题
        /// <summary>
        /// 获取系统消息标题
        /// </summary>
        /// <param name="typeId"></param>
        /// <returns></returns>
        public static string GetSystemMsgTitle(int typeId)
        {
            return Common.EnumHelper.GetDescriptionByValue(typeof(SYH.Enum.WebMessageType), typeId);
        }
        #endregion

        #region 邮件类型
        /// <summary>
        /// 邮件类型
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static  string GetType(int type)
        {
            string result = string.Empty;
          
            result = Common.EnumHelper.GetDescriptionByValue(typeof(SYH.Enum.WebMessageType), type);
            return result;
        }
        #endregion
    }
}
